import math

from openpyxl import Workbook

wb = Workbook()
ws = wb.active

ws.title = 'New one'
ws['A1'] = '数字'
ws['B1'] = '平方'
ws['C1'] = '立方'
ws['D1'] = '阶乘'
ws['E1'] = '阶乘'
for x in range(1,11):
    ws[f'A{x+1}'] = x
    ws[f'B{x+1}'] = x**2
    ws[f'C{x+1}'] = x**3
    ws[f'D{x+1}'] = math.factorial(x)
    ws[f'E{x+1}'] = 2**x
wb.save('balances.xlsx')
